<html>
<meta charset="utf-8">

<head>
    <script src="jquery-3.2.1.min.js"></script>
    <script>
        $(function () {
            $('li a').click(function () {
                $('li a').removeClass('active');
                $(this).addClass('active');
            });
        });
    </script>
    <style>
        ul.left {
            list-style-type: none;
            left: 0;
            top:3%;
            width: 13%;
            height: 100%;
            position: fixed;
            padding: 0;
            background-color: lightcyan;
            overflow: auto;
        }

        ul.left  li a {
            display: block;
            text-align: center;
            padding: 5px 15px;
            text-decoration: none;
            border-bottom: 1px dotted gray;
        }

        li a.active {
            background-color: #4CAF50;
            color: white;
        }

        ul.left li a:link {
            background-color: lightcyan;
        }

        ul.left li a:visited {}

        ul.left li a:hover:not(.active) {
            background-color: #555;
            color: wheat;
        }

        div p {
            font-size: 25px;
        }

        div.mainBody {
            padding-top: 10%;
            margin-left: 13%;
            padding: 1px 10px;
        }

        div.head {
            position: fixed;
            margin: -8px;
            height: 10%;
            width: 100%;
            background-color: black;
            color: whitesmoke;
            padding: 10px;
            text-align: center;
        }
        ul.head{
            list-style-type: none;
            top: 0;   
            left: 0;
            width: 100%;
            position: fixed;
            margin: 0px;
            padding: 0px;
            background-color: black;
            color: white;
        }
        ul.head li a{
            display: block;
            padding: 10px;
            height: 100%;
            text-align: center;
            text-decoration: none;
            color: white;
        }
        ul.head li{
            float: left;
    
            width: 10%;
            border-bottom: 1px solid gray;
            border-right: 1px solid gray;
        }
        ul.head  a:link{
            background: black;
            color: white;
        }
        ul.head  a:hover:not(.active){
            background-color: grey;
        }
    </style>
</head>
<body>
<ul class="head">
        <li><a href="#">主页</a></li>
        <li><a href="#">管理</a></li>
        <li><a href="#">新增</a></li>
        <li><a href="#">修改</a></li>
        <li><a href="#">测试</a></li>
        <li style="float:right;border-left:1px solid gray;"><a href="#">退出</a></li>
</ul>
<ul class="left">
    <li><a href="#">主页</a></li>
    <li><a href="#">管理</a></li>
    <li><a href="#">新增</a></li>
    <li><a href="#">修改</a></li>
    <li><a href="#">测试</a></li>
    <li><a href="#">退出</a></li>
</ul>
<div class="mainBody">
    <h3>导航栏使用ul和li 去除头部的 列前的小标记 和 边距</h3>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>

    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
    <p>123123123123123adsfasdfaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p><br>
</div>
</body>
</html>